<style>
    td{
        text-align: center;
    }
    .center {
        text-align: center;
        font-weight:bold;
        background: #f5f5f5;
    }
    th{
        text-align: center;
        background: #f5f5f5;
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade {if $second == 0} active in{/if} " id="first">
                <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                <table id="table1" class="table table-striped table-bordered table-hover" width="100%">
                    <thead>
                    <tr>
                        <td colspan="10" class="center">北京宏达一甲教育科技有限公司《小学生绘本课堂》发货单  </td>
                    </tr>
                    <tr>
                        <td class="center">日期</td>
                        <td colspan="2">{:date('Y-m-d H:i:s',$order.createtime)}</td>
                        <td class="center">业务员</td>
                        <td>{$order.idCard_text}</td>
                        <td class="center">订单号</td>
                        <td colspan="4">{$order.nb}</td>
                    </tr>
                    <tr>
                        <td rowspan="3" class="center"><p>发</p><p>货</p><p>方</p></td>
                        <td class="center">名称</td>
                        <td colspan="2">{$order.nameShipper}</td>
                        <td rowspan="4" class="center"><p>收</p><p>货</p><p>方</p></td>
                        <td class="center">代理商名称</td>
                        <td colspan="4">{$order.nameAgent}</td>
                    </tr>
                    <tr>
                        <td class="center">电话</td>
                        <td colspan="2">{$order.shipperTelephone}</td>
                        <td class="center">代理上收货人</td>
                        <td colspan="4">{$order.consignee}</td>
                    </tr>
                    <tr>
                        <td class="center">地址</td>
                        <td colspan="2">{$order.shipperAddress}</td>
                        <td class="center">代理商电话</td>
                        <td colspan="4">{$order.consigneeTelephone}</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td colspan="2"></td>
                        <td></td>
                        <td class="center">代理商地址</td>
                        <td colspan="4">{$order.consigneeAddress}</td>
                    </tr>
                    </thead>
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th colspan="2">产品名称</th>
                        <th>数量</th>
                        <th>定价</th>
                        <th>码洋</th>
                        <th>折扣</th>
                        <th>实洋</th>
                        <th>备注</th>
                        <th>状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php $num=0;?>
                    {foreach name="$orderList" item="vo"}
                    <tr>
                        <td></td>
                        <td colspan="2">{$vo.cname}（ {if $vo.type == 1} 半成品 {else} 成品 {/if}）</td>
                        <td>{$vo.num}</td>
                        <td>{$vo.pricing}</td>
                        <td>{$vo.ministrial}</td>
                        <td>{$vo.discount}</td>
                        <td>{$vo.real_ocean}</td>
                        <td>{$vo.remarks}</td>
                        <td>{$vo.status_text}</td>
                    </tr>
                    <?php $num+=$vo['num'];?>
                    {/foreach}
                    <tr>
                        <td colspan="2" class="center">合计数量：</td>
                        <td>{$num}/件</td>
                        <td colspan="2" class="center">合计码洋</td>
                        <td>{$order.order_price}</td>
                        <td colspan="3" class="center">合计实洋</td>
                        <td>{$order.check_order}</td>
                    </tr>
                    <tr>
                        <td class="center">收货方式</td>
                        <td>{$order.receivingWay}</td>
                        <td class="center">要求到货日期</td>
                        <td><input id="c-forArrivalGoodsTime" class="form-control datetimepicker" name="row[forArrivalGoodsTime]"  value="{$order.forArrivalGoodsTime ? date('Y-m-d H:i:s',$order.forArrivalGoodsTime) :''}" placeholder="请选择到货日期"></td>
                        <td class="center">运费承担方</td>
                        <td><input id="c-freightFor"  class="form-control" name="row[freightFor]"  value="{$order.freightFor}" placeholder="请添写运费承担方"></td>
                        <td class="center">备注</td>
                        <td colspan="3"><input id="c-remark"  class="form-control" name="row[remark]"  value="{$order.remark}" placeholder="请填写备注"></td>
                    </tr>
                    </tbody>
                </table>

                {if $orderlogList}
                <div class="panel-lead"><h4>操作日志</h4></div>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>操作人</th>
                        <th>时间</th>
                        <th>操作日志</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="$orderlogList" item="vo"}
                    <tr>
                        <td>{$vo.username}</td>
                        <td>{:date('Y-m-d H:i:s',$vo.createtime)}</td>
                        <td>{$vo.content}</td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                {/if}
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8">
                            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
</div>
